import History from "@/views/History.vue";
import ProGress from "@/views/ProGress.vue";
import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      component: () => import("../views/Layout.vue"),
      redirect: "/list",
      children: [
        { path: "/list", component: () => import("../views/List.vue") },
        { path: "/my", component: () => import("../views/My.vue") },
        { path: "/history", component: History },
        { path: "/progress", component: ProGress },
        {
          path: "/word/:id",
          component: () => import("../views/WordDetail.vue"),
        },
      ],
    },
  ],
});

export default router;
